home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Drivin' Route 66
/
Drivin' Route 66 (1995)(Creative Multimedia)[Mac-PC].iso
/
pc
/
rtcm.dir
/
00225_Script_ACTIVE MAIN
< prev
next >
Wrap
Text File
|
1995-08-24
|
10KB
|
399 lines
--⌐ 1995, Cambridge Digital Media, Inc.
on startMovie
nosprites
global FYI
if FYI > 11 AND FYI < 164 then
set the visible of sprite 4 to false
updatestage
--gonext
set the mouseDownScript to "goNext"
end if
global cursorPic, cursorMask, hotOne
set the mouseDownScript to "playVroom"
--set the cursor of sprite 1 to -1
put the number of cast "keyCon" into cursorPic
put the number of cast "keyCon.mask" into cursorMask
-- puppetSprite 8,1
put 0 into hotOne
end
on playVroom
global hotOne,nextMode
if not (rollOver(9)) then
if hotOne <> 0 then
-- puppetSound "chevy rev"
updateStage
doDelay
repeat while the mouseDown
nothing
end repeat
-- put integer(item 1 of hotOne)*10 + integer(item 2 of hotOne)
put makeCar(hotOne) into hotCar
--put hotCar
put 1 into nextMode
puppetSprite 10,0
puppetSprite 11,0
puppetSprite 12,0
puppetSprite 13,0
goThere integer(hotCar),1
else
-- huh?
end if
end if
end
on grindcars
repeat with x = 1 to the number of lines in field "carTable"
delete char 1 to 3 of line x of field "carTable"
end repeat
end
on grindIndex
put empty into field "carIndex"
repeat with x = 1 to the number of lines in field "carTable"
put (line x of field "carTable") into theChunk
put integer((theChunk)+0) into indNum
put line x of field "hfs" into line indNum of field "carIndex"
end repeat
end
on makeCar thepair
if integer(thepair) = 0 then
return 0
else
put integer(item 1 of thepair)*10 + integer(item 2 of thepair) into indNum
put integer(deriveFNum(line indNum of field "carIndex")) into temp
-- if temp > 14 then
-- put temp+1 into temp
-- end if
return temp
end if
-- return deriveCName(deriveFNum(line indNum of field "carIndex"))
end
on deriveCName input
delete char 1 to 2 of input
put the itemDelimiter into saveDel
set the itemDelimiter to "."
delete item 2 of input
set the itemDelimiter to saveDel
return input
end
on deriveFNum input
delete char 1 of input
put the itemDelimiter into saveDel
set the itemDelimiter to "/"
delete item 2 of input
set the itemDelimiter to saveDel
return input
end
on idle
if the frameLabel = "MENU" then
global hotOne
if not (rollOver(9)) then
-- set the locV of sprite 8 to (the mouseV - 25)
-- set the locH of sprite 8 to (the mouseH - 40)
put checkForHit() into hotOne
if hotOne <> 0 then
showItAll
placeBox hotOne
CallCar hotOne
else
hideInShame
CallCar 0
end if
else
hideInShame
--put checkForHit()
end if
updateStage
else
cursor -1
end if
end
on showItAll
global cursorPic, cursorMask,marqueeMark
if marqueeMark then
set the ink of sprite 8 to 4
put 0 into marqueeMark
else
set the ink of sprite 8 to 0
put 1 into marqueeMark
end if
updateStage
set the visible of sprite 8 to 1
--set the visible of sprite 12 to 1
set the visible of sprite 30 to 0
put the number of cast "keyCon" into iconNum
put the number of cast "keyCon.mask" into maskNum
--cursor [220,221]
cursor [cursorPic, cursorMask] --òò
end
on hideInShame
if the visible of sprite 8 then
set the visible of sprite 8 to 0
--set the visible of sprite 12 to 0
set the visible of sprite 30 to 0
set the ink of sprite 8 to 4
end if
cursor 0
end
on checkForHit
put 0 into theNumber
put 0 into xHit
put 0 into yHit
put 0 into xHit
put 0 into yHit
put 0 into breakit
repeat with xcnt = 15 to 22
if rollOver(xcnt) then
put xcnt into xHit
repeat with ycnt = 23 to 29
if rollOver(ycnt) then
put ycnt into yHit
put 1 into breakit
exit repeat
end if
end repeat
end if
if breakit then exit repeat
end repeat
if (xHit <> 0) and (yHit <> 0) then put (xHit - 14) & "," & (yHit - 22) into theNumber
return theNumber
end
on placeBox which
put integer(item 1 of which) into hotX
put integer(item 2 of which) into hotY
put word hotX of line hotY of field "locLookup" into theLoc
set the locH of sprite 8 to integer(item 1 of theLoc)
set the locV of sprite 8 to integer(item 2 of theLoc)
--puppetTransition 23
end
on setTable
repeat with ln = 1 to (the number of lines in field "locLookup")
repeat with wd = 1 to (the number of words in line ln of field "locLookup")
put string((integer(2 + (80 * (wd - 1)))) & "," & integer(100 + (54 * (ln - 1)))) into ¼
word wd of line ln of field "locLookup"
end repeat
end repeat
end
on CallCar hotOne
put makeCar(hotOne) into hotCar
showName integer(hotCar)
end
on showName thePic
global lastTimePic
puppetSprite 10,1
if thePic <> lastTimePic then
if thePic = 0 then
put getNum("BlankName") into rightNum
if the castNum of sprite 10 <> rightNum then
set the castNum of sprite 10 to rightNum
updateStage
end if
else
put line integer(thePic) of field "hfs" into gotKey
put gotKey
put (deriveFName(gotKey)) into temp
-- put temp
set the castNum of sprite 10 to getNum(temp)
updateStage
-- put temp
-- put (deriveFNum(gotKey)) into temp
-- put integer(temp) into thePic
-- put thePic
end if
end if
-- puppetSprite 10,0
put thePic into lastTimePic
end
on deriveFName input
-- delete char 1 of input
put the itemDelimiter into saveDel
set the itemDelimiter to "/"
delete item 1 of input
set the itemDelimiter to saveDel
return "M" & input
end
on getNum input
return the number of cast input
end
on goThere thePic,theMode
global nextMode,gPic
set the volume of sound 2 to 130
cursor 4
-- put thePic && theMode
put thePic into gPic
put line integer(thePic) of field "hfs" into gotKey
put (deriveFNum(gotKey)) into temp
-- delete char 1 of temp
put integer(temp) into thePic
-- put reverseX(thePic) into thePic
if theMode = 0 then
-- alert string(thePic)
-- beep
-- set the visible of sprite 1 to false
-- go (the frame)+1
-- go frame (thePic*4)+label("c01")-3
else
repeat with s = 6 to 14
set the visible of sprite s to true
end repeat
if theMode = 1 then
set the visible of sprite 2 to true
set the visible of sprite 3 to true
set the visible of sprite 4 to false
else if theMode = 2 then
set the visible of sprite 2 to false
set the visible of sprite 3 to true
set the visible of sprite 4 to true
repeat with s = 9 to 14
set the visible of sprite s to false
end repeat
else if theMode = 3 then
puppetSprite 11,0
puppetSprite 12,0
puppetSprite 13,0
repeat with s = 2 to 14
set the visible of sprite s to false
end repeat
set the visible of sprite 5 to true
else if theMode = 4 then
--evil
set the visible of sprite 2 to 1
set the visible of sprite 3 to 1
end if
set the visible of sprite 1 to true
-- updateStage
--alert string (((thePic*4)-3) + (label("c01")-1))
go frame ((thePic*4)-3) + (label("c01")-1)
end if
-- updateStage
set the mouseDownScript to "goNext"
cursor -1
end
on reverseX input
return integer(line input of field "reverse")
end
on goNext
global nextMode,gPic, where, thesound
global goNow
doDelay
if the doubleClick then
nothing
else
repeat with n = 9 to 14
if rollover(n) AND (the castNum of sprite n > 0) then
--evil
put 1 into goNow
return "no signs"
end if
end repeat
Sound stop 1
puppetSound 0
updateStage
put 1 into goNow
put nextMode+1 into nextMode
put "RTC" & goodPad(gPic) & "TXA.AIF" into theSound
if nextMode > 4 then put 1 into nextMode
goThere integer(gPic),integer(nextMode)
if nextMode = 2 then
if theSound > 0 then
puppetSound 0
set the volume of sound 1 to 255
sound playfile 1, where & theSound
updateStage
end if
end if
end if
end
on goFrom
global nextMode,gPic, theSound
global goNow
set the MouseUpScript to "doNothing"
Sound stop 1
puppetSound 0
updateStage
put 1 into goNow
put "RTC" & goodPad(gPic) & "TXA.AIF" into theSound
goThere integer(gPic),integer(nextMode)
end
on goodPad input
put string(input) into temp
if length(temp) < 2 then
put "0" before temp
end if
return temp
end
on doNothing
nothing
end
on goBack
global nextMode,gPic, theSound
global goNow
Sound stop 1
puppetSound 0
updateStage
put 1 into goNow
put "RTC" & goodPad(gPic) & "TXA.AIF" into theSound
repeat with s = 6 to 14
puppetSprite s,0
set the visible of sprite s to true
end repeat
go frame "preMenu"
unload
end
on dealWithManics
put "doubleclick!"
end
on padQT input
put string(input) into input
if length(input) = 1 then
put "0" before input
end if
return input
end